import {getProduct} from '@/api/biz/product';
import {getDevice} from '@/api/device/device';
import {listAlarm} from '@/api/biz/alarm';
import {listData} from '@/api/biz/deviceData';

function _getProduct(params) {
  return getProduct(params.productId);
}

function _getDevice(params) {
  return getDevice(params.deviceId);
}

const serviceList = [{
  code: 'getDeviceData',
  name: '查询设备信号点数据',
  url: '',
  api: listData,
  params: [
    {
      code: 'deviceId',
      name: '设备id'
    }
  ]
}, {
  code: 'getProduct',
  name: '查询产品信息',
  url: '',
  api: _getProduct,
  params: [
    {
      code: 'productId',
      name: '产品id'
    }
  ]
}, {
  code: 'getDevice',
  name: '查询设备信息',
  url: '',
  api: _getDevice,
  params: [
    {
      code: 'deviceId',
      name: '设备id'
    }
  ]
}, {
  code: 'getDeviceAlarm',
  name: '查询设备告警',
  url: '',
  api: listAlarm,
  params: [
    {
      code: 'deviceId',
      name: '设备id'
    }
  ]
}
];
export default serviceList;
